package cho114366.basic;

public class J22_72 {

	public static void main(String[] args) {
		J11Rtangle re= new J11Rtangle();
		int width=3;
		int height=35;
		String color="orange";
		
		System.out.println("초기값="+width);
		System.out.println("초기값="+height);
		System.out.println("초기값="+color);
		
		
		re= new J11Rtangle(4,40,"red");
		System.out.println("가로는?"+re.width+"세로는?"+re.height+"색깔은?"+re.color);
		System.out.println(re.getArea());
		System.out.println(re.getround());
		
	}

}

class J11Rtangle{
	double width;
	double height;
	String color;
	double area;
	double round;
	
	public J11Rtangle(){}
	public J11Rtangle(double width,double height,String color){
		this.width=width;
		this.height=height;
		this.color=color;
	}
	double getArea(){
		area=width*height;
		return area;}
	double getround(){
		round=(width+height)*2;
	return round;
	}
		
	}
	



